<script>
export default {
  name: 'human component',
  created() {
    console.log( 'created:', this.$route );
  },
  updated() {
    console.log( 'updated:', this.$route.params );
  }
}
</script>

<template>
  <div>
    <p>获取路由参数</p>
    id: {{ $route.params.id }} ,
    name: {{ $route.params.name }}
  </div>
</template>